from mediator import mediator
from mediator . tests . test_assistant import make_mediator_test_keyword_args

class gui_fake :
    def __init__ ( self ) :
        self . _gui_create_image_request = None
    def gui_create_image_request ( self , master , data ) :
        self . _gui_create_image_request = [ master , data ]

class mediator_gui_image_tests : 
    'mediator_gui_image'
    def __init__ ( self , test ) :
        self . _test = test
        self . _gui = gui_fake ( )
        self . _mediator = mediator ( )
        self . _mediator . register_modules ( ** make_mediator_test_keyword_args \
            ( 'gui' 
            , self . _gui 
            , None
            ) )
    def test_gui_create_image_request ( self ) :
        self . _mediator . gui_create_image_request ( 'my master' , 'my data' )
        self . _test . assume_equal ( self . _gui . _gui_create_image_request , [ 'my master' , 'my data' ] )
